#include "Lock.h"
//#include <tr1/function>

using namespace std;

// Lock mutex.
//Lock::Lock(Mutex& mutex) : mutex_(&mutex,
//                                  tr1::bind(&Mutex::unlock, *mutex_, _1)) {
Lock::Lock(Mutex& mutex) : mutex_(&mutex) {
  mutex_->lock();
}

// Unlock mutex.
Lock::~Lock() {
  mutex_->unlock();
}

